package com.luoshengsha.springboot.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.luoshengsha.springboot.bean.User;
import com.luoshengsha.springboot.service.UserService;

import jakarta.annotation.Resource;

@RestController
public class UserController {
	
	@Resource
	private UserService userService;

	@GetMapping("/find")
	public User find(@RequestParam(name="id",required = true,defaultValue = "0") Long id) {
		return userService.find(id);
	}
}
